package com.atguigu.spzx.manager.service.impl;

import com.atguigu.spzx.manager.mapper.SysRoleMapper;
import com.atguigu.spzx.manager.service.SysRoleService;
import com.atguigu.spzx.model.pojo.system.SysRole;
import com.atguigu.spzx.model.request.system.QueryRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole>
        implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;

    /*
     * @description: 分页查询
     **/
    @Override
    public Page<SysRole> findPage(Integer pageNum, Integer pageSize, QueryRequest queryRequest) {
        Page<SysRole> page = new Page<>(pageNum, pageSize);
        return sysRoleMapper.selectRolePage(page,queryRequest);
    }
}
